//
//  ViewController.swift
//  RxSwiftDemo
//
//  Created by lizhi on 2021/8/13.
//

import UIKit
import RxSwift
import  RxCocoa

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
       funcSimpleDemo()
    }
    
    func funcSimpleDemo()  {
        // 1.序列创建
        let ob = Observable<Any>.create { (observer) -> Disposable in
           //3.发送信号
            observer.onNext("LiZhi")
            return Disposables.create()
        }
        //2. 序列订阅
        let _ = ob.subscribe(onNext: {(event) in
            print("订阅到了:\(event)")
        })
    }


}

